package com.mjlf.hometeach.common.service.assit;

import com.mjlf.hometeach.common.db.assit.SubjectDao;
import com.mjlf.hometeach.common.entity.assit.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @auther a123
 * @create 2018-05-06 11:34
 * @desc 科目服务
 */
@Service
public class SubjectService implements SubjectDao {

    @Autowired
    private SubjectDao subjectDao;

    @Override
    public int save(Subject subject) {
        return subjectDao.save(subject);
    }

    @Override
    public int deleteById(Integer subjectId) {
        return subjectDao.deleteById(subjectId);
    }

    @Override
    public Subject getSubjectById(Integer subjectId) {
        return subjectDao.getSubjectById(subjectId);
    }

    @Override
    public List<Subject> listSubjectByClassifyId(Integer classifyId) {
        return subjectDao.listSubjectByClassifyId(classifyId);
    }

    @Override
    public List<Subject> listSubjectByCondition(Subject subject) {
        return subjectDao.listSubjectByCondition(subject);
    }
}
